#version 460


#include "../../lib/project_matrix.glsl"
#include "../../lib/single_color.glsl"


layout(location = 0) in vec4 inPos;

layout(location=0) out vec4 outColor;
layout(location=1) out float UV;
out gl_PerVertex {
	vec4	gl_Position;
	float	gl_PointSize;
};

//vec3 vs[3] = {vec3(-100,-500,0), vec3(-100,500,0), vec3(500,00,0)};
void main(void) {
	vec4 p = vec4(inPos.xyz, 1.0);
	gl_Position = mat_ProjecView[0] * mat_Model[gl_InstanceIndex] * p;
	gl_PointSize = 3.0;
	outColor = f_buildColor(InstanceColor[gl_InstanceIndex]);
    UV = inPos.w;
}

